package net.kleinhenz.norabase.shared.model;

import java.io.Serializable;

public class Rune implements Serializable {

	private static final long serialVersionUID = 1L;

	public static final String CHAMPION = "Champion";
	public static final String EQUIPMENT = "Equipment";
	public static final String SPELL = "Spell";
	public static final String RELIC = "Relic";
	
	protected int id;
	protected String name;
    protected int nora;
    protected int rarity;
    protected String artist;
    protected String faction;
    protected String expansion;
    protected boolean forsale;
    protected boolean tradeable;
    protected boolean allowRanked;
    protected int owned;
    
    public int getId() {
        return id;
    }

    public void setId(int value) {
        this.id = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String value) {
        this.name = value;
    }

    public int getNora() {
        return nora;
    }

    public void setNora(int value) {
        this.nora = value;
    }

    public int getRarity() {
        return rarity;
    }

    public void setRarity(int value) {
        this.rarity = value;
    }

    public String getArtist() {
        return artist;
    }

    public void setArtist(String value) {
        this.artist = value;
    }

    public String getFaction() {
        return faction;
    }

    public void setFaction(String value) {
        this.faction = value;
    }

    public String getExpansion() {
        return expansion;
    }

    public void setExpansion(String value) {
        this.expansion = value;
    }

    public boolean isForsale() {
        return forsale;
    }

    public void setForsale(boolean value) {
        this.forsale = value;
    }

    public boolean isTradeable() {
        return tradeable;
    }

    public void setTradeable(boolean value) {
        this.tradeable = value;
    }

    public boolean isAllowRanked() {
        return allowRanked;
    }

    public void setAllowRanked(boolean value) {
        this.allowRanked = value;
    }

    public int getOwned() {
        return owned;
    }

    public void setOwned(int value) {
        this.owned = value;
    }   
    
    public static String typeToString(Rune rune) {
    	if (rune instanceof Champion)
    		return CHAMPION;
    	else if (rune instanceof Equipment)
    		return EQUIPMENT;
    	else if (rune instanceof Relic)
    		return RELIC;
    	else if (rune instanceof Spell)
    		return SPELL;
    	else
    		return null;
    }
}
